#include <iostream>
#include <memory>
#include "error.hpp"
#include "client_tcp.hpp"

void Usage(std::string proc)
{
    std::cout << "Usage: \n\t" << proc << " ip port\n"
              << std::endl;
}

int main(int argv, char *argc[])
{
    if (argv != 3)
    {
        Usage(argc[0]);
        exit(MAIN_ERROR);
    }
    std::string serverIp = argc[1];
    uint16_t serverPort = atoi(argc[2]);
    std::unique_ptr<ClientTCP> client(new ClientTCP(serverIp, serverPort));
    client->Init();
    client->Start();
    return 0;
}